package com.yihuan.service;

import com.yihuan.entity.UserPlaintEntity;
import com.yihuan.mapper.UserPlaintMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Author:梦醒
 * Date: 2022/5/6 14:10
 * Dream:
 * 信言不美，美言不信。
 * 善者不辩，辩者不善。
 * 知者不博，博者不知。
 * Function:
 */
@Service
public class UserPlaintService {
    @Resource
    UserPlaintMapper userPlaintMapper;
    
    /**
     * 登记评论信息
     *
     * @param userPlaintEntity
     * @return
     */
    public int insertUserPlaintByUserPlaintData(UserPlaintEntity userPlaintEntity) {
        return userPlaintMapper.insertUserPlaintByUserPlaintData(userPlaintEntity);
    }
    
    /**
     * 分页查询数据
     *
     * @param userPlaintEntity
     * @return
     */
    public List<UserPlaintEntity> findUserPlaintByUserPlaintList(UserPlaintEntity userPlaintEntity) {
        return userPlaintMapper.findUserPlaintByUserPlaintList(userPlaintEntity);
    }
    
    
    /**
     * 统计分页查询数据
     *
     * @param userPlaintEntity
     * @return
     */
    public int countUserPlaintList(UserPlaintEntity userPlaintEntity) {
        return userPlaintMapper.countUserPlaintList(userPlaintEntity);
    }
    
    /**
     * 分页查询数据
     *
     * @param userPlaintEntity
     * @return
     */
    public List<UserPlaintEntity> findUserPlaintByUserPlaint(UserPlaintEntity userPlaintEntity) {
        return userPlaintMapper.findUserPlaintByUserPlaint(userPlaintEntity);
    }
    
    
    /**
     * 统计分页查询数据
     *
     * @param userPlaintEntity
     * @return
     */
    public int countUserPlaint(UserPlaintEntity userPlaintEntity) {
        return userPlaintMapper.countUserPlaint(userPlaintEntity);
    }
}
